package com.jxau.subject.common.enums;

import lombok.Getter;

@Getter
public enum IsDeletedFlagEnum {
    DELETED(1, "已删除"),
    UN_DELETED(0, "未删除");



    private final int code;
    private final String desc;

    private IsDeletedFlagEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

//    public static IsDeletedFlagEnum getByCode(int code) {
//        for (IsDeletedFlagEnum e : IsDeletedFlagEnum.values()) {
//            if (e.getCode() == code) {
//                return e;
//            }
//        }
//        return null;
//    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
